package com.itheima;

import com.lmax.disruptor.EventHandler;
import com.lmax.disruptor.WorkHandler;

public class OrderEventHandler implements EventHandler<OrderEvent>, WorkHandler<OrderEvent> {

    @Override
    public void onEvent(OrderEvent event, long sequence, boolean endOfBatch) throws Exception {
        // TODO 消费逻辑
        System.out.println("消费者获取数据value:" + event.getValue() + ",name:" + event.getName());
    }

    @Override
    public void onEvent(OrderEvent event) throws Exception {
        System.out.println("222消费者获取数据value:" + event.getValue() + ",name:" + event.getName());

    }
}